# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html

import scrapy


class CatelogItem(scrapy.Item):
    # define the fields for your item here like:
    # name = scrapy.Field()
    _id = scrapy.Field()
    cate_line = scrapy.Field() # 目录结构 如：['sport','t-shirt','men']
    cate_top = scrapy.Field() # 当前主分类 如： ‘sport’
    cate_name = scrapy.Field() # 当前目录名称 如： 'sport > t-shirt > men''
    cate_level_name = scrapy.Field() # 当前层次的目录名称
    cate_level = scrapy.Field() # 当前目录层次 如： 3
    bestsellers_url = scrapy.Field() # 最好买的url
    newreleases_url = scrapy.Field() # 最新的url
    movers_url = scrapy.Field() # 增长最快的url

    

class ProductItem(scrapy.Item):
    # define the fields for your item here like:
    # name = scrapy.Field()
    # 产品名称
    product_name = scrapy.Field()
    # 产品url sha1码为ID
    product_url = scrapy.Field()
    # 商品图片
    product_img = scrapy.Field()
    # 商品价格
    price_amazon = scrapy.Field()
    product_price = scrapy.Field()
    # 产品评论数
    product_reviews = scrapy.Field()
    # 产品评价
    product_rating = scrapy.Field()
    # 商品主分类，多个为数组 如：【‘sport’，‘clothing’】
    cate_top = scrapy.Field()
    # 商品分类，多个为数组 如：['sport','sport > t-shirt > men']
    cate_ref = scrapy.Field()
    # 月度销售金额
    month_sales = scrapy.Field()
    # 销售排名 多个为数组，如：[{catelog:'sport',rank:'1'},{'catelog':'sport > t-shirt > men',rank:'2'}]
    bestsellers_rank = scrapy.Field()
    rank_top = scrapy.Field()
    # 新品排名,rank数组 如： [{catelog:'sport',rank:'1'},{'catelog':'sport > t-shirt > men',rank:'2'}]
    newreleases_rank = scrapy.Field()
    # 增长排名,rank数组 如： [{catelog:'sport',rank:'1'},{'catelog':'sport > t-shirt > men',rank:'2'}]
    movers_rank = scrapy.Field()
